package br.edu.fa7.especializao.extremeprograming.tuita.integration;

import junit.framework.Assert;

import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class WelcomeTestITCase {
	
	@Test
	public void welcomeTest(){
		WebDriver driver = new FirefoxDriver();
		
		driver.get("http://localhost:8080/tuita/home.jsf");
		
		boolean textoPresente = driver.getPageSource().contains("I'm alive!");

		Assert.assertTrue("Texto Encontrado", textoPresente);
		
		driver.close();
		
		driver.quit();

	}

}
